package com.xbongbong.admin.domain.dao;

import com.xbongbong.admin.domain.entity.MirrorChartCategoryEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * @auther: xingxing.xiao
 * @date: 2020/3/6 006 11:30
 */
@Repository
@Mapper
public interface MirrorChartCategoryDao {

    Integer insert(MirrorChartCategoryEntity entity);

    Integer update(MirrorChartCategoryEntity entity);

    void insertBatch(@Param("list") List<MirrorChartCategoryEntity> list);

    Integer deleteByKey(@Param("key") Long key, @Param("mirrorId") Long mirrorId);

    MirrorChartCategoryEntity getByKey(@Param("key") Long key, @Param("mirrorId") Long mirrorId);

    List<MirrorChartCategoryEntity> findEntitys(@Param("param") Map<String, Object> param);

    Integer getEntitysCount(@Param("param") Map<String, Object> param);

    MirrorChartCategoryEntity getByMirrorId(@Param("mirrorId") Long mirrorId, @Param("parentId") Long parentId);
}
